<!-- page heading start-->
<div class="page-heading">
    <h3>
        财务奖金分配详情----<?php echo $room['name'];?>----<?php echo I('get.name', "", "") . I("get.year", "", "") . "年" . I("get.month", "", "") . "月"?>
    </h3>

</div>
<!-- page heading end-->
<div class="row">
    <div class="col-sm-12">
        <section class="panel">
            <header class="panel-heading">
                <!--<button class="btn btn-primary" data-toggle="modal" data-target="#myModal">
                    增加
                </button>-->
            </header>
            <div class="panel-body">
                <table class="table table-hover general-table table-bordered">
                    <thead>
                    <tr>
                        <th width="20%">名字</th>
                        <th width="20%">金额</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($list as $val){?>
                    <tr>
                        <td>
                            <span style="word-break:break-all;word-wrap:break-word">
                                <?php echo $val['emp_name'];?>
                            </span>
                        </td>
                        <td>
                            <span style="word-break:break-all;word-wrap:break-word">
                                <?php echo $val['award'];?>
                            </span>
                        </td>
                        <td>
                            <div>
                                <a class="btn btn-danger" href="#"
                                   onclick="<?php echo 'return delete_data(' . $val['id'] .')';?>">删除</a>
                            </div>
                        </td>
                    </tr>
                    <?php }?>

                    </tbody>
                </table>
                <div class="pages">
                    {$page}
                </div>
            </div>
        </section>
    </div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <input type="hidden" id="id" value="">
                <div class="row">
                    <label class="form-inline">奖金时间:
                    <input class="form-control date-picker" style="width: 300px;" name="date" id="date"
                           placeholder="请选择时间">
                    </label>
                </div>

            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary" onclick="update();">
                    提交更改
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<script>

    function delete_data(id){
        $.ajax({
            data:{id:id},
            dataType:'json',
            url:'/User/Tool/awardDtlDelete',
            type:'get',
            success:function(res){
                window.location.reload();
            }
        });
        return false;
    }
</script>
<script type="text/javascript" src="/Public/js/laydate/laydate.js"></script>
<style>
    .laydate_table {
        display: none;
    }
    #laydate_hms{
        display: none !important;
    }
</style>
<script type="text/javascript">
    $( ".date-picker" ).bind( "click", function(){
        laydate( {
            format: 'YYYY/MM',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06', //最大日期
            istime: true,
            istoday: false
        } );
        laydate.skin( "molv" );
    });
</script>